package com.code.day19;

import java.util.HashMap;
import java.util.Set;

public class Demo03HashMap {
    public static void main(String[] args) {
        HashMap<String,String> map1 = new HashMap<>();
        map1.put("郭靖","黄蓉");
        map1.put("杨过","小龙女");
        map1.put("张三丰", "郭襄");
        map1.put("张无忌","赵敏");
        map1.put("涛哥","三上");

        //将所有的key获取出来,放到set集合
        Set<String> set = map1.keySet();

        for (String key : set) {
            String value = map1.get(key);
            System.out.println(key+":"+value);
        }

    }

}
